{% load wuliu_extras %}
<div class="card card-primary card-outline shadow"><div class="card-body">
    <table id="{{ table_id }}" class="table table-bordered table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th>运单号码</th>
                <th>运单状态</th>
                <th>开票日期</th>
                <th>开票部门</th>
                <th>到达部门</th>
                <th data-value_type="int">运费</th>
                <th>开票部门发车时间</th>
                <th>货场入库时间</th>
                <th>货场发车时间</th>
                <th>到货时间</th>
            </tr>
        </thead>
        <tbody>
          {% for waybill in waybills_info_list %}
            <tr>
                <td></td>
                <td data-order="{{ waybill.id }}"><a href="{% url 'wuliu:detail_waybill' waybill.id %}">{{ waybill.get_full_id }}</a></td>
                <td data-key="wb_status" data-order="{{ waybill.status }}" data-status_id="{{ waybill.status }}">{{ waybill.get_status_display }}</td>
                <td data-key="wb_create_time" data-order="{{ waybill.create_time.timestamp }}">{{ waybill.create_time | date:"Y-m-d H:i:s" }}</td>
                <td data-key="wb_src_department" data-src_dept_id="{{ waybill.src_department.id }}">{{ waybill.src_department.name }}</td>
                <td data-key="wb_dst_department" data-dst_dept_id="{{ waybill.dst_department.id }}">{{ waybill.dst_department.name }}</td>
                <td data-key="wb_fee">{{ waybill.fee }}</td>
                <td data-key="wb_departed_time" data-order="{{ waybill.departed_time.timestamp }}">{{ waybill.departed_time | date:"Y-m-d H:i:s" }}</td>
                <td data-key="wb_goods_yard_arrived_time" data-order="{{ waybill.goods_yard_arrived_time.timestamp }}">{{ waybill.goods_yard_arrived_time | date:"Y-m-d H:i:s" }}</td>
                <td data-key="wb_goods_yard_departed_time" data-order="{{ waybill.goods_yard_departed_time.timestamp }}">{{ waybill.goods_yard_departed_time | date:"Y-m-d H:i:s" }}</td>
                <td data-key="wb_arrival_time" data-order="{{ waybill.arrival_time.timestamp }}">{{ waybill.arrival_time | date:"Y-m-d H:i:s" }}</td>
            </tr>
          {% endfor %}
        </tbody>
    </table>
</div></div>
{% js_init_datatable table_id False 3 %}
